package com.kaifamiao.mapper;

import com.kaifamiao.entity.User;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {

    @Update("UPDATE t_users " +
            "SET " +
            "account = #{account}, " +
            "email = #{email}, " +
            "tel = #{tel}, " +
            "nickname = #{nickname}, " +
            "gender = #{gender, typeHandler=GenderTypeHandler}, " +
            "birthdate = #{birthdate, typeHandler=LocalDateTypeHandler}, " +
            "married = #{married, typeHandler=BooleanTypeHandler}, " +
            "admin = #{admin, typeHandler=BooleanTypeHandler} " +
            "WHERE id = #{id}")
    int update( User user );

}
